package com.gmail.rusal4ica.logic;

/**
 * @author The Imperial Sword Team
 */

public class Player {
	private String name;
	private char sign;
	private static Player currentPlayer;
	private int result;

	public Player(String name, char sign){
		if(name != null && !name.equals("")){
			this.name=name;
		}
		this.sign = sign;
	}

	public static void switchPlayers(Player player1, Player player2){
		currentPlayer = (currentPlayer == player1)? player2 : player1;
	}
	
	public static void setCurrentPlayer(Player player){
		if(player != null){
			currentPlayer = player;
		}
	}
	
	public static Player getCurrentPlayer(){
		return currentPlayer;
	}
	
	public String getName(){
		return name;
	}

	public char getSign(){
		return sign;
	}

	public int getResult() {
		return result;
	}

	public void addResult() {
		this.result++;
	}	
}